﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace VueShopApi.Entities 
{
	/// <summary>
	/// 会员表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sp_user", DisableSyncStructure = true)]
	public partial class SpUser 
	{
		/// <summary>
		/// 自增id
		/// </summary>
		[JsonProperty("user_id"), Column(Name = "user_id", IsPrimary = true, IsIdentity = true)]
		public int UserId { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty("create_time"), Column(Name = "create_time")]
		public int CreateTime { get; set; }

		/// <summary>
		/// 新用户是否已经通过邮箱激活帐号
		/// </summary>
		[JsonProperty("is_active"), Column(Name = "is_active", InsertValueSql = "'否'")]
		public SpUserISACTIVE? IsActive { get; set; }

		/// <summary>
		/// 登录密码
		/// </summary>
		[JsonProperty("password"), Column(Name = "password", DbType = "char(64)", IsNullable = false)]
		public string Password { get; set; }

		/// <summary>
		/// qq官方唯一编号信息
		/// </summary>
		[JsonProperty("qq_open_id"), Column(Name = "qq_open_id", DbType = "char(32)")]
		public string QqOpenId { get; set; }

		/// <summary>
		/// 修改时间
		/// </summary>
		[JsonProperty("update_time"), Column(Name = "update_time")]
		public int UpdateTime { get; set; }

		/// <summary>
		/// 邮箱
		/// </summary>
		[JsonProperty("user_email"), Column(Name = "user_email", StringLength = 64, IsNullable = false)]
		public string UserEmail { get; set; }

		/// <summary>
		/// 新用户注册邮件激活唯一校验码
		/// </summary>
		[JsonProperty("user_email_code"), Column(Name = "user_email_code", DbType = "char(13)")]
		public string UserEmailCode { get; set; }

		/// <summary>
		/// 爱好
		/// </summary>
		[JsonProperty("user_hobby"), Column(Name = "user_hobby", StringLength = 32, IsNullable = false)]
		public string UserHobby { get; set; }

		/// <summary>
		/// 简介
		/// </summary>
		[JsonProperty("user_introduce"), Column(Name = "user_introduce", StringLength = -1)]
		public string UserIntroduce { get; set; }

		/// <summary>
		/// qq
		/// </summary>
		[JsonProperty("user_qq"), Column(Name = "user_qq", StringLength = 32, IsNullable = false)]
		public string UserQq { get; set; }

		/// <summary>
		/// 性别
		/// </summary>
		[JsonProperty("user_sex"), Column(Name = "user_sex", InsertValueSql = "'男'")]
		public SpUserUSERSEX UserSex { get; set; }

		/// <summary>
		/// 手机
		/// </summary>
		[JsonProperty("user_tel"), Column(Name = "user_tel", StringLength = 32, IsNullable = false)]
		public string UserTel { get; set; }

		/// <summary>
		/// 学历
		/// </summary>
		[JsonProperty("user_xueli"), Column(Name = "user_xueli", InsertValueSql = "'本科'")]
		public SpUserUSERXUELI UserXueli { get; set; }

		/// <summary>
		/// 登录名
		/// </summary>
		[JsonProperty("username"), Column(Name = "username", StringLength = 128, IsNullable = false)]
		public string Username { get; set; }

	}

	public enum SpUserISACTIVE {
		是 = 1, 否
	}
	public enum SpUserUSERSEX {
		保密 = 1, 女, 男
	}
	public enum SpUserUSERXUELI {
		博士 = 1, 硕士, 本科, 专科, 高中, 初中, 小学
	}
}
